how to store state in localstorage react